# Maintainer: Eric Belanger <eric@archlinux.org>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

pkgname=colorgcc
pkgver=1.4.5
pkgrel=2
pkgdesc="A Perl wrapper to colorize the output of compilers with warning/error messages matching the gcc output format"
arch=('any')
url="https://github.com/colorgcc/colorgcc"
license=('GPL')
depends=('perl')
backup=('etc/colorgcc/colorgccrc')
source=($pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz)
sha256sums=('2febee044d26770edbc1f8de56d2339a6ed2b69289dcc7ca2b33d21eb3980ef8')

package() {
  cd $pkgname-$pkgver
  install -Dm755 colorgcc.pl "${pkgdir}/usr/bin/colorgcc"
  install -Dm644 colorgccrc.txt "${pkgdir}/etc/colorgcc/colorgccrc"
  install -Dm644 README "${pkgdir}/usr/share/doc/colorgcc/README"

  install -d "${pkgdir}/usr/lib/colorgcc/bin"
  for i in cc c++ gcc g++ ; do
    ln -s /usr/bin/colorgcc "${pkgdir}/usr/lib/colorgcc/bin/${i}"
  done
}
